package com.jinxin.platform.cdfaceacs.service;


import com.github.pagehelper.PageInfo;
import com.jinxin.platform.cdfaceacs.common.ResultEntity;
import com.jinxin.platform.cdfaceacs.pojo.domains.AcsControlDeviceInfo;
import com.jinxin.platform.cdfaceacs.pojo.domains.AcsControlDeviceSubscribe;
import com.jinxin.platform.cdfaceacs.pojo.domains.AcsControlUserInfoDO;


import java.util.List;

/**
 * (AcsControlDeviceInfo)表服务接口
 *
 * @author makejava
 * @since 2020-04-14 10:31:12
 */
public interface AcsControlDeviceInfoService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    AcsControlDeviceInfo queryById(String id);

    /**
     * 查询多条数据
     *
     * @param offset 查询起始位置
     * @param limit 查询条数
     * @return 对象列表
     */
    List<AcsControlDeviceInfo> queryAllByLimit(int offset, int limit);

    PageInfo<AcsControlDeviceInfo> queryByLimitAndCondition(int offset, int limit, String type, String deviceName, String buildingLoc, String roomLoc);

    /**
     * 新增数据
     *
     * @param acsControlDeviceInfo 实例对象
     * @return 实例对象
     */
    AcsControlDeviceInfo insert(AcsControlDeviceInfo acsControlDeviceInfo);

    /**
     * 修改数据
     *
     * @param acsControlDeviceInfo 实例对象
     * @return 实例对象
     */
    AcsControlDeviceInfo update(AcsControlDeviceInfo acsControlDeviceInfo);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(String id);

    /**
     * 查询所有门禁设备
     * @return
     */
    List<AcsControlDeviceInfo> selAll();

    AcsControlDeviceInfo selectByDeviceId(String deviceId);

    AcsControlDeviceInfo selectByBuildingLoc(String buildingLoc);

    List<AcsControlDeviceInfo> selAllByParam(AcsControlDeviceInfo info );

    Boolean controlDevice(AcsControlDeviceSubscribe acsControlDeviceSubscribe, String controlParams, String operation);
    boolean register(AcsControlDeviceInfo acsControlDeviceInfo, List<AcsControlUserInfoDO> acsControlUserInfoDOS, String mac);
    boolean deleteFace(String userId,String mac);
    boolean deleteAllFace(String mac);
    boolean set(AcsControlDeviceInfo acsControlDeviceInfo, String mac);
    boolean getDevice();
    ResultEntity saveDevice(AcsControlDeviceInfo acsControlDeviceInfo);
    void sendMessage(String mac,String msg);
    String openDoor(String mac);
    String compare(String mac, String password,String type);

}